package com.dayuan.dao;

import java.util.List;

import org.mybatis.spring.annotation.MapperScan;

import com.dayuan.bean.ShopCart;
import com.dayuan.bean.ShopCartInfo;

@MapperScan
public interface ShopCartMapper {

	/*根据用户id查询购物车从表goods_id和Number（连表产寻）*/
	public List<ShopCartInfo> selectShopCartByUserId(Integer userId);
	
	/*根据购物车id删除商品*/
	public int deleteShopCartInfo(Integer id);
	
	/*商品加入购物车*/
	public int insertShopCart(ShopCart shopCart);
	public int insertShopCartInfo(ShopCartInfo shopCartInfo);
	
	/*查询userid是否存在*/
	public ShopCart selectShopCartById(Integer userid);
	
	
	/*修改物品数量*/
	public int updateShopCartInfo(ShopCartInfo shopCartInfo);
	
	
	/*根据goodsid和shopcard_id查询物品是否存在*/
	public ShopCartInfo selectShopCartInfo(ShopCartInfo shopCartInfo);
	
	
}
